package com.kalvan.web.feign.client.fallback;

import com.kalvan.client.constant.CommonReturnCode;
import com.kalvan.client.model.Request;
import com.kalvan.client.model.Response;
import com.kalvan.web.feign.client.SccDictClient;
import com.kalvan.web.feign.client.SccLogClient;
import com.kalvan.web.feign.client.SccMockClient;
import com.kalvan.web.feign.client.req.DictRequest;
import com.kalvan.web.feign.client.req.LogRequest;
import com.kalvan.web.feign.client.req.MockRequest;
import com.kalvan.web.feign.client.res.DictResponse;

import javax.validation.Valid;
import java.util.List;

/**
 * @author chenliang
 */
public class SccApiFallback implements SccDictClient, SccMockClient, SccLogClient {

    @Override
    public Response<List<DictResponse>> getDict(@Valid Request<DictRequest> request) {
        return Response.buildResult(CommonReturnCode.FALLBACK);
    }

    @Override
    public Response<String> getMockUrl(@Valid Request<MockRequest> request) {
        return Response.buildResult(CommonReturnCode.FALLBACK);
    }

    @Override
    public Response insertLog(@Valid Request<LogRequest> request) {
        return Response.buildResult(CommonReturnCode.FALLBACK);
    }
}
